Document that a size of (GtkIconSize)-1 means don't scale.
authorOwen Taylor <otaylor@redhat.com>
Wed, 30 Jan 2002 00:08:41 +0000 (00:08 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 30 Jan 2002 00:08:41 +0000 (00:08 +0000)
Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (gtk_style_render_icon): Document that
        a size of (GtkIconSize)-1 means don't scale.

        * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
        -1 convention.

        * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
        gtk_style_render_icon() to make sure that we catch it
        obviously if the style's render function tries to
        scale.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkimage.c
gtk/gtkstyle.c

index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index e7729798d025a5f3377c1040bc909ddf86a00254..1fd92a9cce064d6d455de0175bc1dbf5fc5e3e78 100644 (file)
@@ -1,3 +1,16 @@
+Tue Jan 29 19:04:41 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_render_icon): Document that
+       a size of (GtkIconSize)-1 means don't scale.
+
+       * gtk/gtkstyle.c (gtk_default_render_icon): Obey the
+       -1 convention.
+
+       * gtk/gtkimage.c (gtk_image_expose): Pass in -1 to
+       gtk_style_render_icon() to make sure that we catch it
+       obviously if the style's render function tries to
+       scale.
+
 Tue Jan 29 18:50:59 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimage.c (gtk_image_expose): Optimize exposes of
index fc72560745c5d4eea8d04401e86543ca82caeb05..280a8d772073e55105091a19fd4f585c5b8c7df2 100644 (file)
@@ -1400,7 +1400,7 @@ gtk_image_expose (GtkWidget      *widget,
                                                     gtk_widget_get_direction (widget),
                                                     GTK_WIDGET_STATE (widget),
                                                     /* arbitrary */
-                                                    GTK_ICON_SIZE_SMALL_TOOLBAR,
+                                                    (GtkIconSize)-1,
                                                     widget,
                                                     "gtk-image");
 
index c680032a4144c90221d6e72c3f064a14f19e9dfc..b4307301716b29a07e019bd785a545e76fdf5a42 100644 (file)
@@ -1760,7 +1760,8 @@ gtk_style_real_set_background (GtkStyle    *style,
  * @source: the #GtkIconSource specifying the icon to render
  * @direction: a text direction
  * @state: a state
- * @size: the size to render the icon at
+ * @size: the size to render the icon at. A size of (GtkIconSize)-1
+ *        means render at the size of the source and don't scale.
  * @widget: the widget 
  * @detail: a style detail
  * @returns: a newly-created #GdkPixbuf containing the rendered icon
@@ -1905,10 +1906,10 @@ gtk_default_render_icon (GtkStyle            *style,
       return NULL;
     }
 
-  /* If the size was wildcarded, then scale; otherwise, leave it
-   * alone.
+  /* If the size was wildcarded, and we're allowed to scale, then scale; otherwise,
+   * leave it alone.
    */
-  if (gtk_icon_source_get_size_wildcarded (source))
+  if (size != (GtkIconSize)-1 && gtk_icon_source_get_size_wildcarded (source))
     scaled = scale_or_ref (base_pixbuf, width, height);
   else
     scaled = GDK_PIXBUF (g_object_ref (G_OBJECT (base_pixbuf)));